package com.igame.Service;

import com.igame.common.PageResult;
import com.igame.common.Result;
import com.igame.dto.DeleteCarGoodsDao;
import com.igame.dto.GoodsDao;
import com.igame.dto.GoodsPageQueryDto;
import com.igame.dto.HistoryDto;
import com.igame.entity.*;
import com.igame.vo.GoodsVo;
import com.igame.vo.ShoppingCartVo;
import org.springframework.web.multipart.MultipartFile;

import java.math.BigDecimal;
import java.util.List;

public interface GoodsService {
    PageResult pageQuery(GoodsPageQueryDto goodsPageQueryDto,String name);

    Result<List<Goods>> goodsList(GoodsDao goodsDao);

    Result<GoodsVo> getGoodsById(Integer id);

    Result insertToCar(ShoppingCart cartObj);

    Result<List<ShoppingCartVo>> getCarGoods(Integer userId);

    Result deleteCarGoods(DeleteCarGoodsDao dao);

    Result<List<GoodsVo>> getIPosted(Integer id);

    Result<List<GoodsVo>> iSold(Integer id);

    Result<List<GoodsVo>> buyFormCar(Integer[] ids);

    Result<GoodsVo> soloBuy(Integer id);

    Result<List<GoodsVo>> selectObligation(Integer userId);

    Result<List<GoodsVo>> selectPendingReceipt(Integer userId);

    Result<List<GoodsVo>> getCompleted(Integer userId);

    void sendGoodsIdToRedis(HistoryDto historyDto);

    Result<List<GoodsVo>> getHistory(Integer userId);

    Result<List<FreePost>> getAllFreePost();

    Result<List<Fineness>> getAllFineness();

    Result<List<Pack>> getAllPack();

    Result<List<Version>> getAllVersion();

    Result<List<Platform>> getAllPlatform();

    Result addGoods(String name, String description, BigDecimal price, Integer categoryId, Integer freePostId, Integer pageOptionId, Integer conditionId, Integer versionId, Integer platformId, String introduction, Integer loginId, MultipartFile coverImage,List<MultipartFile> images);

}
